﻿using Sharp.WeShare.Common;
using Sharp.WeShare.MP.ShakeRound.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sharp.WeShare.MP.ShakeRound
{
    public class ShakeRoundApi
    {
        /// <summary>
        ///  申请开通摇一摇周边功能
        /// </summary>
        /// <param name="accessToken"></param>
        /// <param name="param"></param>
        /// <returns></returns>
        public static BaseRes Regediter(string accessToken, RegediterParam param)
        {
            var url = string.Format("https://api.weixin.qq.com/shakearound/account/register?access_token={0}", accessToken);
            return Utils.PostResult<BaseRes>(param, url);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="accessToken"></param>
        /// <param name="info"></param>
        /// <returns></returns>
        public static AddPageRes AddPage(string accessToken,PageInfo info)
        {
            var url = string.Format("https://api.weixin.qq.com/shakearound/page/add?access_token={0}");
            return Utils.PostResult<AddPageRes>(info, url);
        }
    }
}
